package com.ruoyi.flow.mapper.de;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.flow.model.de.ProdDeModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @title:
 * @author: bruce.liu
 * @since: 2023/5/9 23:43
 */
@Repository
public interface ProdDeModelMapper extends BaseMapper<ProdDeModel> {
    /**
     * 分页查询模板列表
     *
     * @param query 参数
     * @param page  分页参数
     * @return
     */
    IPage<ProdDeModel> queryPagerModel(@Param("query") ProdDeModel query, IPage<ProdDeModel> page);

    /**
     * 判断是否存在
     * @param modelKey modelKey
     * @return
     */
    Integer getDeModelCount(String modelKey) ;

    /**
     * 获取最新版本的modelkey
     * @param modelKey modelKey
     * @return
     */
    ProdDeModel selectLatestModelKey(@Param("modelKey") String modelKey) ;
}
